import { StyleSheet, Text, View, TouchableOpacity } from 'react-native';
import React from 'react';
import Header from './components/Header';
import navigationTool from './utilities/navigationTool';
const App = () => {
    return (
        <View style={styles.wrapper}>
            <Header title="详情" shwowBack={true} isNativeBack={true} />
            <Text>EzMallDetails</Text>

            <TouchableOpacity
                onPress={() => {
                    navigationTool.popToRoot();
                }}
                activeOpacity={1}
                style={styles.btnWrapper}>
                <Text>返回root</Text>
            </TouchableOpacity>

            <TouchableOpacity
                onPress={() => {
                    navigationTool.popToRoot();
                    navigationTool.seleTab(2);
                }}
                activeOpacity={1}
                style={styles.btnWrapper}>
                <Text>跳转tab</Text>
            </TouchableOpacity>
        </View>
    );
};

export default App;

const styles = StyleSheet.create({
    wrapper: {
        flex: 1,
    },
    btnWrapper: {
        width: 100,
        height: 100,
        justifyContent: 'center',
        alignItems: 'center',
    },
});
